package com.example.malllocationserver.repository.Impl;
import com.example.malllocationserver.entity.Comments;
import com.example.malllocationserver.entity.StoreUI;
import com.example.malllocationserver.mapper.StoreMapper;
import com.example.malllocationserver.repository.StoreRepository;
import org.springframework.beans.factory.annotation.Autowired;
import com.example.malllocationserver.entity.Store;
import org.springframework.stereotype.Repository;

import java.sql.Timestamp;
import java.util.List;
@Repository
public class StoreRepositoryImpl implements StoreRepository{
    @Autowired
    StoreMapper storeMapper;

    @Override
    public List<Store> searchByType(String type){
        return storeMapper.searchByType(type);
    }
    @Override
    public List<Store> searchByName(String name){
        return storeMapper.searchByName(name);
    }

    @Override
    public void addComments(String storename, String comments, String username, Timestamp time_com) {
        storeMapper.addComments(storename, comments, username,time_com);
    }
    @Override
    public List<Comments> getComments(String storename){
        return storeMapper.getComments(storename);
    }

    @Override
    public List<StoreUI> getStoreUI(String storeid){return storeMapper.getStoreUI(storeid);}
}
